﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.NhaDat>" %>
<% string tenloaibds = Model.LoaiBatDongSan.TenLoaiBatDongSan.ToUpper();%>
<div class="article_preview">
    <div class="preview_img">
        <% if (tenloaibds.Contains(WebConfiguration.NhaDatDuAn))
           { %>
            <a href="<%= Url.Action("ChiTietNhaDatDuAn", "Home", new { id = Model.ID }) %>">
        <% }else{ %>
            <a href="<%= Url.Action("ChiTietNhaDatLe", "Home", new { id = Model.ID }) %>">
        <% } %>
			<img class="cms_article_preview_image" src="../../../Content/Images/Items/<%= Model.HinhMinhHoa %>" alt="<%= Model.TieuDe %>" />
        </a>
    </div>
    <div>
        <div>
            <h3 class="article_preview">
                <% if (tenloaibds.Contains(WebConfiguration.NhaDatDuAn))
                   { %>
                    <a href="<%= Url.Action("ChiTietNhaDatDuAn", "Home", new { id = Model.ID }) %>"><span><%= Model.TieuDe %></span></a>&nbsp; 
                <% }else{ %>
                    <a href="<%= Url.Action("ChiTietNhaDatLe", "Home", new { id = Model.ID }) %>"><span><%= Model.TieuDe %></span></a>&nbsp; 
                <% } %>
            </h3>
        </div>
        <div class="article_preview_contents showpreviewonly restore">
			<div>
				<p class="cms_article_preview_txt_content postcontainer">
				<strong><a href="<%= Url.Action("SelectNhaDatByLoaiBatDongSan", "Home", new { idloaibatdongsan = Model.LoaiBatDongSan.ID }) %>"><%= Model.LoaiBatDongSan.TenLoaiBatDongSan %></a></strong>: <span class="previewdate"><%= DateTime.Parse(Model.NgayDang.ToString()).ToShortDateString() %></span> - <b><%= Model.NoiDungRutGon %>...</b>
                <% if (tenloaibds.Contains(WebConfiguration.NhaDatDuAn))
                   { %>
                    <a class="readmore_spr" href="<%= Url.Action("ChiTietNhaDatDuAn", "Home", new { id = Model.ID }) %>">Xem tiếp »</a>
                <% }else{ %>
                    <a class="readmore_spr" href="<%= Url.Action("ChiTietNhaDatLe", "Home", new { id = Model.ID }) %>">Xem tiếp »</a>
                <% } %>
					
				</p>
			</div>
		</div>
        <div>
			<span>
				<div class="preview_fav">
				</div>
			</span>
        </div>
    </div>
</div>